#include <iostream>
#include <strings.h>
#include <irrlicht.h>
#include "IrrLibGUI.h"
using
namespace
irr;
using
namespace
core;
using
namespace
scene;
using
namespace
video;
using
namespace
io;
using
namespace
gui;
using
namespace
std;
IrrLibGUI::IrrLibGUI()
{
this
->nStaticText = 0;
}
IrrLibGUI::~IrrLibGUI()
{
}
void
IrrLibGUI::SetEnv(IGUIEnvironment* env)
{
this
->env = env;
}
void
IrrLibGUI::Clear()
{
this
->env->clear();
}
void
IrrLibGUI::DrawAll()
{
this
->env->drawAll();
}
void
IrrLibGUI::AddStaticText()
{
this
->env->addStaticText(L
"Powered by IrrLib."
, rect<s32>(0,0,0,0),
true
);
}
void
IrrLibGUI::AddStaticText(std::string message)
{
this
->env->addStaticText((
wchar_t
*)message.c_str(), rect<s32>(0,0,0,0),
true
);
}
void
IrrLibGUI::AddStaticText(std::string message,
int
x1,
int
y1,
int
x2,
int
y2)
{
this
->env->addStaticText((
wchar_t
*)message.c_str(), rect<s32>(x1,y1,x2,y2),
true
);
}
void
IrrLibGUI::AddStaticText(std::string message,
int
x1,
int
y1,
int
x2,
int
y2,
bool
border,
bool
wordwrap)
{
this
->env->addStaticText((
wchar_t
*)message.c_str(), rect<s32>(x1,y1,x2,y2), border, wordwrap);
}
void
IrrLibGUI::AddStaticText(std::string message,
int
x1,
int
y1,
int
x2,
int
y2,
bool
border,
bool
wordwrap,
int
id,
bool
fillbackground)
{
this
->env->addStaticText((
wchar_t
*)message.c_str(), rect<s32>(x1,y1,x2,y2), border, wordwrap, 0, id, fillbackground);
}
void
IrrLibGUI::AddStaticText(std::string message,
const
core::rect< s32 > &rectangle)
{
this
->env->addStaticText((
wchar_t
*)message.c_str(), rectangle);
}
void
IrrLibGUI::AddStaticText(std::string message,
const
core::rect< s32 > &rectangle,
bool
border,
bool
wordwrap)
{
this
->env->addStaticText((
wchar_t
*)message.c_str(), rectangle, border, wordwrap);
}
void
IrrLibGUI::AddStaticText(std::string message,
const
core::rect< s32 > &rectangle,
bool
border,
bool
wordwrap,
int
id,
bool
fillbackground)
{
this
->env->addStaticText((
wchar_t
*)message.c_str(), rectangle, border, wordwrap, 0, id, fillbackground);
}